import request from '@/utils/request'

//获取部门树数据
export function getDepartTree(data) {
	return request({
		method: 'get',
		url: 'tbSysDept/queryTree',
		params: data
	})
}

//添加部门
export function addedDepart(data) {
	return request({
		method: 'post',
		url: 'tbSysDept/add',
		data,
	})
}

//修改部门
export function updateDepart(data) {
	return request({
		method: 'post',
		url: 'tbSysDept/update',
		data,
	})
}

//删除部门
export function deleteDepart(id) {
	return request({
		method: 'get',
		url: 'tbSysDept/delete/' + id,
	})
}

//获取部门详情
export function queryDepart(id) {
	return request({
		method: 'get',
		url: 'tbSysDept/query/' + id,
	})
}